package engine;

import game.Engine;
import java.awt.BorderLayout;
import java.io.File;
import javax.imageio.ImageIO;
import javax.swing.JFrame;
import javax.swing.JPanel;

public class Main {
    
    public static void main(String[] args) throws Exception {
        Engine eng = new Engine(); 

        JFrame frame = new JFrame("JCGE_1");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(eng.pixelsW, eng.pixelsH + 22);
        frame.setIconImage(ImageIO.read(new File("imgs/icon.png")));
        frame.setResizable(false);
        frame.setLocation(0, 0);
        frame.setVisible(true);

        JPanel panel = new JPanel(new BorderLayout());
        panel.add(eng, "Center");
        frame.setContentPane(panel);
        frame.pack();
        
        eng.run();
        
        frame.dispose();
    }
    
}
